<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" content="no-siteapp,no-transform,no-store, no-cache, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <link rel="shortcut icon" href="../../../favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../../../static/css/font.css">
    <link rel="stylesheet" href="../../../static/css/weadmin.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../../../static/css/buildUnit/common.css">
    <style>
    </style>
</head>
<body>
<form class="layui-form" id="form" action="" lay-filter="suggest" style="padding:20px;width:100%;height:100%;">
    <div class="transparentMode"></div>
    <input type="hidden" name="adviseId">
    <input type="hidden" name="circleFontSize">
    <div class="layui-form-item">
        <label class="layui-form-label required">图纸编号1</label>
        <div class="layui-input-block">
            <input type="text" name="drawingNo" required lay-verify="required" placeholder="图纸编号" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">条文性质</label>
        <div class="layui-input-block" id="articleTypeView">
            <script type="text/html" id="articleType">
                <select name="articleType" lay-verify="required" lay-filter="articleType">
                    <option value="">请选择</option>
                    {{# layui.each(d, function(index, item){ }}
                    <option value="{{item.value}}">{{item.name}}</option>
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item" style="display:none;">
        <label class="layui-form-label required">强条类别</label>
        <div class="layui-input-block" id="qiangtiaoCodeView">
            <script type="text/html" id="qiangtiaoCode">
                <select name="qiangtiaoCode" lay-verify="" lay-filter="qiangtiaoCode">
                    <option value="">请选择</option>
                    {{# layui.each(d, function(index, item){ }}
                    <option value="{{item.value}}">{{item.name}}</option>
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item" style="display:none;">
        <label class="layui-form-label required">违反企业</label>
        <div class="layui-input-block" id="wfqyView">
            <script type="text/html" id="wfqy">
                <select name="qiangtiaoCode" lay-verify="" lay-filter="qiangtiaoCode">
                    <option value="">请选择</option>
                    {{# layui.each(d, function(index, item){ }}
                    <option value="{{item.value}}">{{item.name}}</option>
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item" style="display:none;">
        <label class="layui-form-label required">违反人员</label>
        <div class="layui-input-block" id="wfryView">
            <script type="text/html" id="wfry">
                <select name="qiangtiaoCode" lay-verify="" lay-filter="qiangtiaoCode">
                    <option value="">请选择</option>
                    {{# layui.each(d, function(index, item){ }}
                    <option value="{{item.value}}">{{item.name}}</option>
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">条文编号</label>
        <div class="layui-input-block">
            <input type="text" name="tiaowenNo" required lay-verify="required" placeholder="规范编号及条目" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label required">审查意见</label>
        <div class="layui-input-block">
            <textarea name="adviseTxt" required lay-verify="required" placeholder="请输入内容"
                      class="layui-textarea"></textarea>
        </div>
    </div>
    <button lay-submit lay-filter="demo1" style="display: none;" class="demo1">确定</button>
</form>
<script src="../../../static/js/main.js"></script>
<script>
    layui.use([
        'form',
        'jquery',
        'serializeObject',
        'sessionFun',
        'configure',
        'bluebird',
        'jsDictFile',
        'templateInit',
        'matchDict',
        'configureCom'
    ], function () {
        window.$ = layui.jquery;
        var configure = layui.configure;
        var sessionFun = layui.sessionFun;
        var form = layui.form;
        var templateInit = layui.templateInit;
        var jsDictFile = layui.jsDictFile;
        window.configureCom = layui.configureCom;
        window.serializeObject = layui.serializeObject;

        //获得suggestData
        var suggestData = sessionFun.get(configure.SESSION_SUGGEST_DATA);
        templateInit.init('articleTypeView', jsDictFile.adviseArticleType, $('#articleType').html());
        templateInit.init('qiangtiaoCodeView', jsDictFile.qiangtiaoCode, $('#qiangtiaoCode').html());
        form.render('select');
        //如果意见对象存在，则初始赋值
        if (suggestData) {
            if (suggestData.qiangtiaoCode) {
                $('#qiangtiaoCodeView').parents('.layui-form-item').show();
            }
            form.render('select', 'qiangtiaoCode');
            form.val("suggest", suggestData);
            sessionFun.remove(configure.SESSION_SUGGEST_DATA);
            configureCom.readOnly();
            $('.transparentMode').show();
        }
    });
</script>
</body>
</html>